import java.util.Arrays;
import java.util.Scanner;

public class code {


    public static String ZhaoHe(int[] arr,int target){
        int[] arr1 = {1,2};

        for(int i = 0 ; i < arr.length;i++){
            for(int j = i+1 ;j < arr.length;j++){
                if(arr[i] + arr[j] == target){
                    arr1[0] = i;
                    arr1[1] = j;
                }
            }
        }
        String newArr = Arrays.toString(arr1);
        return newArr;
    }
    public static void main(String[] args) {
        int[] nums = {1,2,3,4,5,6,7,8,9,10};
        Scanner scan = new Scanner(System.in);
        int target = scan.nextInt();
        System.out.println(ZhaoHe(nums,target));
    }
}
